#utf-8
import logging
import redis

connection = None


def rd_connect():
    global connection
    #logging.debug()
    try:
        pool  = redis.ConnectionPool(host='47.107.112.135', port=6379, decode_responses=True)
        connection =redis.Redis(connection_pool=pool)
    except Exception as e:
        logging.debug(e)
    return connection